﻿<%@ Page Language="C#" %>

<%
    String str_maNguoiDung = Request["maKhachHang"];
    int int_maNguoiDung = int.Parse(str_maNguoiDung);
    DTO.NguoiDungDto nguoidung = BUS.NguoiDungBus.LayNguoiDungTheoID(int_maNguoiDung);
  
    Response.Write("<table align='center' border='0' style='text-align:left'");
    Response.Write("<tr><th>Mã Tài Khoản</th>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtMa' value='" + nguoidung.Ma + "' /></td></tr>");
 
    Response.Write("<tr><td>Tên Đăng Nhập</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtUser' value='" + nguoidung.TenDangNhap + "' /></td></tr>");
    
    
    Response.Write("<tr><td>Họ Tên</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtHoTen' value='" + nguoidung.HoTen + "'  /></td></tr>");
    
    
    Response.Write("<tr><td>Email</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtEmail' value='" + nguoidung.Email + "'  /></td></tr>");
    
    
    Response.Write("<tr><td>Địa Chỉ</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtDiaChi' value='" + nguoidung.DiaChi + "'/></td></tr>");
    
    Response.Write("<tr><td>Điện Thoại</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtDienThoai' value='" + nguoidung.DienThoai + "'/></td></tr>");
    
    Response.Write("<tr><td>Ngày Sinh</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtNgaySinh' value='" + nguoidung.NgaySinh  + "'/></td></tr>");
    
    Response.Write("<tr><td>Số Tài Khoản</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtSoTaiKhoan' value='" + nguoidung.SoTaiKhoan + "'/></td></tr>");
    
    Response.Write("<tr><td>Điểm</td>");
    Response.Write("<td><input class='textfield' disabled='disabled' type='text' id='txtDiem' value='" + nguoidung.Diem + "'/></td></tr>");
    
    Response.Write("<tr><td>Trạng Thái</td>");
    Response.Write("<td><select class='textfield' disabled='disabled' id='cmbTrangThai'>");
    System.Collections.Generic.List<String> trangthai = BUS.NguoiDungBus.LayNguoiDungTrangThai();
    for (int i = 0; i < trangthai.Count; i++)
    {
        if(nguoidung.TrangThai == trangthai[i])
            Response.Write("<option selected value='" + trangthai[i] + "'>" + trangthai[i] + "</option>");
        else
            Response.Write("<option value='" + trangthai[i] + "'>" + trangthai[i] + "</option>");
    }
    Response.Write("</select></td></tr>");
    
    
    
    Response.Write("<tr><td colspan='2' align='center'><input type='button' value='Hủy' onclick='cancelCapNhat()' /></td></tr>");
    Response.Write("</table>");
 %>